package com.diytomcat.catalina;

import org.apache.log4j.Logger;

import cn.hutool.core.date.TimeInterval;

/**
 * @author Leon Plious
 * @decription 文件名和地址
 */
public class Context {
	private final Logger log = Logger.getLogger(Context.class);
	// 文件访问路径
	private String path;
	// 绝对路径
	private String docBase;
	
	public Context(String path, String docBase) {
		TimeInterval timeInterval = new TimeInterval();
		this.path = path;
		this.docBase = docBase;
		
		log.info(String.format("Deploying web application directory %s", this.docBase));
		log.info(String.format("Deployment of web application directory %s has finished in %d ms", this.docBase, timeInterval.intervalMs()));
	}
	
	public void setPath(String path) {
		this.path = path;
	}
	
	public String getPath() {
		return this.path;
	}
		
	public void setDocBase(String docBase) {
		this.docBase = docBase;
	}
	
	public String getDocBase() {
		return this.docBase;
	}
	
	
}
